using System;
using System.Data;
using vs.Core;

namespace Forum
{
    public partial class forum_searchbox : Window
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtWhat.Text.Trim() == "") return;

                string searchdesk = this.GetModuleSetting("searchdesk");
                string url = UrlProvider.DesktopUrl(searchdesk) + "?w=" + txtWhat.Text.Trim();
                Response.Redirect(url);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
    }
}